package 测试;

import java.util.HashMap;

public class 父母血型 {

	public static void main(String[] args) {

	}

}

class ChkBloodType {
	public String[] chkBlood(String father, String mother) {
		HashMap<String, String[]> hm = new HashMap<>();
		hm.put("OO", new String[] { "O" });
		hm.put("AO", new String[] { "A", "O" });
		hm.put("AA", new String[] { "A", "O" });
		hm.put("AB", new String[] { "A", "AB", "B", "O" });
		hm.put("AAB", new String[] { "A", "AB", "B" });
		hm.put("BO", new String[] { "B", "O" });
		hm.put("BB", new String[] { "B", "O" });
		hm.put("BAB", new String[] { "A", "AB", "B" });
		hm.put("ABO", new String[] { "A", "B" });
		hm.put("ABAB", new String[] { "A", "AB", "B" });

		String key1 = father + mother;
		String key2 = mother + father;
		if (hm.containsKey(key1)) {
			return hm.get(key1);
		} else if (hm.containsKey(key2)) {
			return hm.get(key2);
		}
		return null;
	}
}